Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/surveys #170

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Feat/surveys #170

wants to merge 23 commits into from

Conversation

Ahmedhossamdev
Copy link
Member

Fixes: #160

@coveralls
Copy link

coveralls commented Feb 6, 2025

Coverage Status

coverage: 8.566% (+3.0%) from 5.55%
when pulling dc1729d on feat/surveys
into 35a7025 on main.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great start! Let me know when you have a chance to work through the changes I mentioned in surveyUtils.js, and I'll continue reviewing!

src/components/stops/StopPane.svelte Outdated Show resolved Hide resolved
@@ -114,6 +161,44 @@
</div>
</div>
</div>
{#if showHeroQuestion && currentStopSurvey}
<div class="hero-question-container relative rounded-lg bg-gray-50 p-6 shadow">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract the content inside of the {#if} into a new component.

src/lib/Surveys/surveyUtils.js Outdated Show resolved Hide resolved
const now = new Date();
return surveys.filter(
(survey) =>
new Date(survey.end_date) > now &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's valid for a survey to not have an end date, which makes it not appear on-screen as this filters it out as being invalid.

@@ -0,0 +1,121 @@
import { showSurveyModal, surveyStore } from '$stores/surveyStore.js';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write a couple basic unit tests for each of the functions in this file. That will help us ensure that there are no regressions going forward, and that we're all on the same page with regard to product behavior.

@Ahmedhossamdev
Copy link
Member Author

Hi @aaronbrethorst,

You can continue reviewing now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add basic survey feature support
3 participants